<div id=admin>
<h1>Editer une oeuvre</h1>
<?php echo form_open_multipart('pieces/confirm_changes','',array('id' => $piece['id'], 'room_id'=> $selected));?>
<label>Nom </label><?php echo form_input('name',$piece['name']);?><br/><br/>
<label>Description </label><?php echo form_textarea(array('name'=>'description','value'=>$piece['description'], 'rows' => '4','cols'=>'60'));?><br/><br/>
<label>Auteur</label><?php echo form_input('author',$piece['author']);?><br/><br/>
<label>Date de création (aaaa-mm-jj)</label><?php echo form_input('date_creation',$piece['date_creation']);?><br/><br/>
<label>Salle</label><?php echo form_dropdown('room_id', $options, $selected);?><br/><br/>
<label>Photo</label><img src="/uploads/<?php echo $piece['photo'] ?>" name='photo' height="100"/>
	<?php echo anchor_popup('upload/do_upload','Modifier l\'image','upload');
	?>
	<?php echo form_input(array('value'=>$piece['photo'],'name'=>'upload', 'id'=>'upload', 'style'=>'display:none'));?>
<br /><br />
<label>Ressources</label><?php echo form_textarea(array('name'=>'ressources','value'=>$piece['ressources'], 'rows' => '4','cols'=>'60'));?><br/><br/>
<label>&nbsp;</label><?php echo form_submit('','Ok');?><br/><br/>

<?php echo form_close();?>
</div>
